package org.helgoboss.hotkey_listener

import com.melloware.jintellitype.JIntellitypeConstants

object Modifiers extends Modifiers

trait Modifiers {
    case object Win extends Modifier(JIntellitypeConstants.MOD_WIN)
    case object Alt extends Modifier(JIntellitypeConstants.MOD_ALT)
    case object Ctrl extends Modifier(JIntellitypeConstants.MOD_CONTROL)
    case object Shift extends Modifier(JIntellitypeConstants.MOD_SHIFT)
}

sealed class Modifier(val jIntellitypeMask: Int) {
    def +(otherModifier: Modifier) = ModifierCombination(Set(this, otherModifier))
    def +(key: Key) = ModifierCombination(Set(this)) + key
}